package com.xz.auth.service;

import com.xz.common.utils.JwtUtils;
import org.springframework.stereotype.Service;

@Service
public class AuthorizationService {

    public static long accessTokenExpirationTime = 1000 * 60;
    public static long refreshTokenExpirationTime = 1000 * 60 * 3;

    public String createAccessIdToken(String userId) {
        return JwtUtils.getJwtToken(userId, accessTokenExpirationTime);
    }

    public String createRefreshIdToken(String userId) {
        return JwtUtils.getJwtToken(userId, refreshTokenExpirationTime);
    }


}
